Skip to content

[Crypto] Reduce dependencies of crypto#29646

Open
siemen11 wants to merge 3 commits intolowRISC:earlgrey_1.0.0from
siemen11:cryptolibs_deps_1
Open

[Crypto] Reduce dependencies of crypto#29646
siemen11 wants to merge 3 commits intolowRISC:earlgrey_1.0.0from
siemen11:cryptolibs_deps_1

Conversation

@siemen11
Copy link
Copy Markdown
Contributor

@siemen11 siemen11 commented Apr 1, 2026

To remove unused functions in the cryptolib tar, we reduce the dependencies of the cryptolib to make the library more standalone

siemen11 added 3 commits April 1, 2026 11:10
Remove the runtime dependencies from the cryptolib.

Signed-off-by: Siemen Dhooghe <sdhooghe@google.com>
Remove the dependency of silicon creator files in the cryptolib.

Signed-off-by: Siemen Dhooghe <sdhooghe@google.com>
Remove the dependency of lib/arch by gating
otcrypto_security_config_check via OPENTITAN_IS_EARLGREY.

Signed-off-by: Siemen Dhooghe <sdhooghe@google.com>
@siemen11 siemen11 requested a review from a team as a code owner April 1, 2026 09:35
@siemen11 siemen11 requested review from moidx and removed request for a team and moidx April 1, 2026 09:35
@siemen11 siemen11 added the CherryPick:master This PR should be cherry-picked to master label Apr 1, 2026
Comment on lines +24 to +34
// Check if the dummy instructions and the data independent timing is
// enabled in ibex.
hardened_bool_t ibex_secure_config = ibex_check_security_config();
if (launder32(ibex_secure_config) == kHardenedBoolFalse) {
return OTCRYPTO_FATAL_ERR;
}
HARDENED_CHECK_EQ(ibex_secure_config, kHardenedBoolTrue);
}
else {
// Do not check the device config when security level is low.
HARDENED_CHECK_EQ(security_level, kOtcryptoKeySecurityLevelLow);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you move this chunk into the macro #IF?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to take over the role of kDeviceType == kDeviceSilicon

Copy link
Copy Markdown
Contributor

@andrea-caforio andrea-caforio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @siemen11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CherryPick:master This PR should be cherry-picked to master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants